#include <iostream>
#include <string>

// 设计一个包含纯虚函数的抽象类，并实现具体的派生类。

using namespace std;

class shape
{
public:
    virtual double get() = 0;
    virtual void show() = 0;
};

class circle : public shape
{
public:
    double r;
public:
    circle(double r) : r(r) {}
    double get()
    {
        return 3.14 * r * r;
    }
    void show()
    {
        cout << "半径: " << r << " 圆的面积是：" << get() << endl;
    }
};

int main(int argc, char const *argv[])
{
    circle c(2.0);
    c.show();
    
    return 0;
}
